package yns.springboot.security.sample.dto;

import java.io.Serializable;

import yns.springboot.security.sample.base.bean.BaseDto;

public class RoleDto extends BaseDto implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4003151646733329172L;

	private int id;
	
	private String roleID;
	private String roleName;
	private String authorityName;
	
	private String creactTime; 
	private String modifyTime;

	
	private static final String AUTHORITY_NAME_PREFIX = "ROLE_";
	
	public String buildAuthorityName(String name) {
		return  AUTHORITY_NAME_PREFIX + name;
	}

	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getRoleID() {
		return roleID;
	}

	public void setRoleID(String roleID) {
		this.roleID = roleID;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getAuthorityName() {
		return authorityName;
	}

	public void setAuthorityName(String authorityName) {
		this.authorityName = authorityName;
	}

	public String getCreactTime() {
		return creactTime;
	}

	public void setCreactTime(String creactTime) {
		this.creactTime = creactTime;
	}

	public String getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(String modifyTime) {
		this.modifyTime = modifyTime;
	}


	@Override
	public String toString() {
		return "RoleDto [id=" + id + ", roleID=" + roleID + ", roleName=" + roleName + ", authorityName="
				+ authorityName + ", creactTime=" + creactTime + ", modifyTime=" + modifyTime + "]";
	}

	

}
